package com.css.zfzx.sjcj.modules.repository;

import com.css.zfzx.sjcj.modules.pojo.PcProgressFillEntity;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: pc-statistics
 * @Author: lhl
 * @CreateDate: 2021/7/6 16:29
 */
@Repository
public interface PcProgressFillRepository extends JpaRepository<PcProgressFillEntity,String> {

    @Query(nativeQuery = true,value = "select * from pc_progress_fill where task_code = :id and division_code =:code")
    PcProgressFillEntity getEntityByCode(String id,String code);

    @Query(nativeQuery = true,value = "select * from pc_progress_fill where parent_code = :pId and division_code =:divisionCode")
    List<PcProgressFillEntity> getEntityByPIdAndDivisionCode(String pId,String divisionCode);
}
